package org.zavgame.ejb;

import java.io.Serializable;

/**
 * The request object for the requesting Players service.
 * 
 * @author alexey
 *
 */
public class PlayerRequest implements Serializable
{

   /**
    * 
    */
   private static final long serialVersionUID = -2049888874191671015L;

   private String username;

   private String transactionId;

   private int balanceChange;

   /**
    * Default PlayerRequest constructor.
    */
   public PlayerRequest()
   {
   }

   public PlayerRequest(String username, String transactionId, int balanceChange)
   {
      this.username = username;
      this.transactionId = transactionId;
      this.balanceChange = balanceChange;
   }

   public String getUsername()
   {
      return username;
   }

   public void setUsername(String username)
   {
      this.username = username;
   }

   public String getTransactionId()
   {
      return transactionId;
   }

   public void setTransactionId(String transactionId)
   {
      this.transactionId = transactionId;
   }

   public int getBalanceChange()
   {
      return balanceChange;
   }

   public void setBalanceChange(int balanceChange)
   {
      this.balanceChange = balanceChange;
   }

   /**
    * Uses for logging.
    */
   @Override
   public String toString()
   {
      StringBuilder sb = new StringBuilder();
      sb.append("PlayerRequest:{")//
         .append("username: ").append(username).append(" ") //
         .append(", transactionId: ").append(transactionId).append(" ") //
         .append(", balanceChange: ").append(balanceChange).append(" ") //
         .append("} ");
      return sb.toString();
   }

}
